package com.yuanfeng.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.base.entity.BaseWxLiveGoodsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Entity com.yuanfeng.base.entity.BaseWxLiveGoods
 */
@Mapper
public interface BaseWxLiveGoodsMapper extends BaseMapper<BaseWxLiveGoodsEntity> {

    /**
     * 分页查询直播商品
     *
     * @param page
     * @param param
     * @return
     */
    IPage<BaseWxLiveGoodsEntity> queryLiveCommons(IPage<BaseWxLiveGoodsEntity> page, @Param("param") Map<String, Object> param);

    /**
     * 查询商品详情
     * @param commonId
     * @return
     */
    BaseWxLiveGoodsEntity queryCommonDetail(@Param("commonId") Integer commonId);

    /**
     * 批量新增直播商品
     * @param wxLiveGoodsList
     * @return
     */
    Integer insertLiveGoods(@Param("wxLiveGoods") List<BaseWxLiveGoodsEntity> wxLiveGoodsList);
}




